import {request, config} from 'utils'
import * as commonService from "utils/services";

const {api} = config;
const {products} = api;
export async function query(params = {}) {
  params.apiBaseUrl = `${products}/store`;
  return commonService.commonQuery(params);
}
export async function dele(storeId) {
  const url = `${products}/store/delete/${storeId}`
  return request({ url: url, method: 'DELETE' })
}
export async function modify(storeId, params) {
  const url = `${products}/store/update/${storeId}`
  return request({ url: url, method: 'POST', data: params })
}
export async function queryProductList({storeId, ...queryParam}) {
  const url = `${products}/store/commodity/list/${storeId}`
  return request({ url: url, method: 'post', data: queryParam })
}
export async function link(queryParam) {
  const url = `${products}/store/commodity/update`
  return request({ url: url, method: 'post', data: queryParam })
}